package com.huilian.iotbox.admin.quartz.job;

import com.huilian.iotbox.admin.service.StatsCommodityStockRecordService;
import com.huilian.iotbox.data.utils.DateTimeUtils;
import lombok.extern.slf4j.Slf4j;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author 龙 路 飞
 * @CreateDate: 2023-08-31 16:21
 * @Description:
 */
@Slf4j
public class StatsMonthCommodityStockRecordJob implements BaseJob {
    @Autowired
    private StatsCommodityStockRecordService statsCommodityStockRecordService;
    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        log.info("--------------定时任务 每月统计上月的商品库存记录 统计开始 时间{}---------------", DateTimeUtils.currTime());

        statsCommodityStockRecordService.statsMonthCommodityStockRecordJob();

        log.info("--------------定时任务 每月统计上月的商品库存记录 统计结束 end时间{}---------------", DateTimeUtils.currTime());
    }
}
